import request from '@/utils/http'

// ---------------------------成品库管理-----------------

// 指定出入库类型、开始时间、结束时间，查询出入库记录
export function getInOutPipe(inOutType, begin, end) {
  return request.request({
    url:
      '/api/v3.1/business/finished-products/in-out-pipe?inOutType=' +
      inOutType +
      '&&begin=' +
      begin +
      '&&end=' +
      end,
    method: 'get'
  })
}

// 获取盘存信息
export function getPanCun() {
  return request.request({
    url: '/api/v3.1/business/finished-products/inventory',
    method: 'get'
  })
}

// 查询货位信息
export function getProductLocation() {
  return request.request({
    url: '/api/v3.1/business/finished-products/product-location',
    method: 'get'
  })
}
// 指定出入库类型、开始时间、结束时间、品种，查询出入库记录
export function postChuRuKuJiLuChaXun(data) {
  return request.request({
    url: '/api/v3.1/business/finished-products/in-out-pipe',
    method: 'post',
    data
  })
}

// 指定出入库类型、开始时间、结束时间，查询出入库品种
export function getChaXunChuRuKuPingZhong(data) {
  return request.request({
    url:
      '/api/v3.1/business/finished-products/in-out-pipe-materials-code?inOutType=' +
      data.inOutType +
      '&begin=' +
      data.begin +
      '&end=' +
      data.end,
    method: 'get'
  })
}
